]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
switchMonitor: Fix switching configuration
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 19 Mar 2022 15:53:59 +0000 (16:53 +0100)
committerMarge Bot <marge-bot@gnome.org>
Sun, 20 Mar 2022 22:04:55 +0000 (22:04 +0000)
Since commit 37271ffe709fc957, we pass an explicit `switchType` instead
of the selected item's index to select a configuration. Alas, the item
use `switchMode` as property name, so we always end up passing `undefined`.

Change both to `configType` which matches the API on the other end.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5217

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2245>

js/ui/switchMonitor.js

index 7338582188325e4c4b88367fe8bb7dfa44ea165f..10b4a50cde2f0ead512c2b7925cef9ca7e126417 100644 (file)
@@ -18,7 +18,7 @@ class SwitchMonitorPopup extends SwitcherPopup.SwitcherPopup {
              * Try to keep it under around 15 characters.
              */
             label: _('Mirror'),
-            switchMode: Meta.MonitorSwitchConfigType.ALL_MIRROR,
+            configType: Meta.MonitorSwitchConfigType.ALL_MIRROR,
         });
 
         items.push({
@@ -27,7 +27,7 @@ class SwitchMonitorPopup extends SwitcherPopup.SwitcherPopup {
              * Try to keep it under around 15 characters.
              */
             label: _('Join Displays'),
-            switchMode: Meta.MonitorSwitchConfigType.ALL_LINEAR,
+            configType: Meta.MonitorSwitchConfigType.ALL_LINEAR,
         });
 
         if (global.backend.get_monitor_manager().has_builtin_panel) {
@@ -37,7 +37,7 @@ class SwitchMonitorPopup extends SwitcherPopup.SwitcherPopup {
                  * Try to keep it under around 15 characters.
                  */
                 label: _('External Only'),
-                switchMode: Meta.MonitorSwitchConfigType.EXTERNAL,
+                configType: Meta.MonitorSwitchConfigType.EXTERNAL,
             });
             items.push({
                 icon: 'computer-symbolic',
@@ -45,7 +45,7 @@ class SwitchMonitorPopup extends SwitcherPopup.SwitcherPopup {
                  * Try to keep it under around 15 characters.
                  */
                 label: _('Built-in Only'),
-                switchMode: Meta.MonitorSwitchConfigType.BUILTIN,
+                configType: Meta.MonitorSwitchConfigType.BUILTIN,
             });
         }
 
@@ -86,7 +86,7 @@ class SwitchMonitorPopup extends SwitcherPopup.SwitcherPopup {
         const monitorManager = global.backend.get_monitor_manager();
         const item = this._items[this._selectedIndex];
 
-        monitorManager.switch_config(item.switchType);
+        monitorManager.switch_config(item.configType);
     }
 });